package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.tanghulu.TangHuLuMakeData;
import com.yanqu.road.entity.activity.tanghulu.TangHuLuScoreInfo;
import com.yanqu.road.entity.activity.tanghulu.TangHuLuUserData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;

public class TangHuLuBusiness {


    public static TangHuLuUserData getUserData(long userId, int activityId) {
        return DaoHelper.getTangHuLuUserDataDaoImpl().getTangHuLuUserData(activityId, userId);
    }

    public static List<TangHuLuMakeData> getMakeData(long userId, int activityId) {
        return DaoHelper.getTangHuLuMakeDataDaoImpl().getTangHuLuMakeData(activityId, userId);
    }

    public static List<TangHuLuScoreInfo> getScoreRuleConfig(int activityId){
        return DaoHelper.getTangHuLuConfigDaoImpl().getTangHuLuScoreInfo(activityId);
    }

    public static boolean addTangHuLuUserData(TangHuLuUserData userData) {
        return DaoHelper.getTangHuLuUserDataDaoImpl().add(userData);
    }

    public static boolean updateTangHuLuUserData(TangHuLuUserData userData) {
        return DaoHelper.getTangHuLuUserDataDaoImpl().update(userData);
    }

    public static boolean addTangHuLuMakeData(TangHuLuMakeData data) {
        return DaoHelper.getTangHuLuMakeDataDaoImpl().add(data);
    }

    public static boolean updateTangHuLuMakeData(TangHuLuMakeData data) {
        return DaoHelper.getTangHuLuMakeDataDaoImpl().update(data);
    }
}
